toObjectStream

suspend fun <ERROR CLASS><Any>.toObjectStream(scope: <ERROR CLASS> = GlobalScope): <ERROR CLASS>

Convert a flow to an object mode stream by writing the flow's elements to an internal.PassThrough.

Collects the flow in GlobalScope by default, eventually scope will become a context receiver.

TODO make scope a context receiver.

Sources

js source
Link copied to clipboard